package vip.ifmm.lehouse.common.message;

import java.io.Serializable;

/**
 * 基本消息类
 *
 * @author Fish
 * <p>Email: fishinlove@163.com</p>
 * <p>created by 2019/06/18 19:32:36</p>
 */
public class BasedMessage implements Serializable {

    private static final long serialVersionUID = -7845488548945403451L;

    // 消息发送时间
    private long messageSentTime = System.currentTimeMillis();

    // 消息过期时间
    private int messageExpiredTime = Integer.MAX_VALUE; // 单位：秒

    public long getMessageSentTime() {
        return messageSentTime;
    }

    public int getMessageExpiredTime() {
        return messageExpiredTime;
    }

    public BasedMessage setMessageSentTime(long messageSentTime) {
        this.messageSentTime = messageSentTime;
        return this;
    }

    public BasedMessage setMessageExpiredTime(int messageExpiredTime) {
        this.messageExpiredTime = messageExpiredTime;
        return this;
    }
}
